home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 45
/
Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso
/
Aminet
/
dev
/
e
/
yaec.lha
/
startup
/
generate.script
< prev
next >
Wrap
Text File
|
2001-08-12
|
2KB
|
128 lines
;YAEC 1.5a - generate.script (010224) / Leif 2001
.K src/A,mode/A,linkfiles/A,dest/A,aargs/A,largs/A,opti/A
.BRA {
.KET }
SET ESTART "e:startup/startup.o"
SET LSTART "e:startup/library.o"
SET DSTART "e:startup/device.o"
SET YLIB "e:startup/yaec.lib"
IF {opti} EQ 1
SET DEFAARGS "NOEXE OPT nrqbtlps"
ELSE
SET DEFAARGS "NOEXE OPT 0"
ENDIF
SET DEFLARGS "SD SC NODEBUG"
SET ASMERR "Assembler error !"
SET LNKERR "Linker error !"
FAILAT 21 ; script takes care of errors
IF {mode} EQ 4544581
ECHO "Generating executable.. " NOLINE
PHXASS {src}.asm $DEFAARGS {aargs} TO {src}.o > t:op
IF WARN
ECHO $ASMERR
TYPE t:op
SKIP err
ENDIF
ECHO "Assembled OK.. " NOLINE
PHXLNK $ESTART {linkfiles} $YLIB {src}.o TO {dest} $DEFLARGS {largs} > t:op
IF $RC NOT EQ 0
ECHO $LNKERR
TYPE t:op
SKIP err
ENDIF
ECHO "Linked OK." NOLINE
SKIP ok
ENDIF
IF {mode} EQ 5194314
ECHO "Generating linkobj.. " NOLINE
PHXASS {src}.asm $DEFAARGS {aargs} TO {dest}.o > t:op
IF WARN
ECHO $ASMERR
TYPE t:op
SKIP err
ENDIF
ECHO "Assembled OK." NOLINE
SKIP ok
ENDIF
IF {mode} EQ 4999490
ECHO "Generating library.. " NOLINE
PHXASS {src}.asm $DEFAARGS {aargs} TO {src}.o > t:op
IF WARN
ECHO $ASMERR
TYPE t:op
SKIP err
ENDIF
ECHO "Assembled OK.. " NOLINE
PHXLNK $LSTART {linkfiles} $YLIB {src}.o TO {dest} $DEFLARGS {largs} > t:op
IF WARN
ECHO $LNKERR
TYPE t:op
SKIP err
ENDIF
ECHO "Linked OK." NOLINE
SKIP ok
ENDIF
IF {mode} EQ 4474198
ECHO "Generating device.. " NOLINE
PHXASS {src}.asm $DEFAARGS {aargs} TO {src}.o > t:op
IF WARN
ECHO $ASMERR
TYPE t:op
SKIP err
ENDIF
ECHO "Assembled OK.. " NOLINE
PHXLNK $DSTART {linkfiles} $YLIB {src}.o TO {dest} $DEFLARGS {largs} > t:op
IF WARN
ECHO $LNKERR
TYPE t:op
SKIP err
ENDIF
ECHO "Linked OK." NOLINE
SKIP ok
ENDIF
IF {mode} EQ 5066564
SKIP ok
ENDIF
ECHO "Generate error ! - unknown target." ; we shouldnt get here..
LAB err
ECHO "There was errors in generating target. "
SKIP end
LAB ok
ECHO "No Errors. "
LAB end ; cleanup
UNSET ESTART
UNSET LSTART
UNSET DSTART
UNSET YLIB
UNSET DEFAARGS
UNSET DEFLARGS
;UNSET EXE
;UNSET OBJ
;UNSET LIB
;UNSET DEV
UNSET ASMERR
UNSET LNKERR
DELETE t:op >NIL:
FAILAT 10
QUIT